// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 主开人员确认任务 POST /trade/task/audit */
export async function auditorHandleTaskUsingPost(
  body: API.TradeTaskHandleVO,
  options?: { [key: string]: any },
) {
  return request<API.TradeResult>('/trade/task/audit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 查询交易任务的附言记录 GET /trade/task/comments/${param0} */
export async function listTradeTaskCommentsUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listTradeTaskCommentsUsingGETParams,
  options?: { [key: string]: any },
) {
  const { taskId: param0, ...queryParams } = params;
  return request<API.TradeResult>(`/trade/task/comments/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 设计人员确认任务 POST /trade/task/confirm */
export async function designerHandleTaskUsingPost(
  body: API.TradeTaskHandleVO,
  options?: { [key: string]: any },
) {
  return request<API.TradeResult>('/trade/task/confirm', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除交易任务 POST /trade/task/delete */
export async function deleteTradeTasksUsingPost(body: string[], options?: { [key: string]: any }) {
  return request<API.TradeResult>('/trade/task/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 查询交易任务详细信息 GET /trade/task/detail/${param0} */
export async function fetchTaskDetailUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.fetchTaskDetailUsingGETParams,
  options?: { [key: string]: any },
) {
  const { taskId: param0, ...queryParams } = params;
  return request<API.TradeResult>(`/trade/task/detail/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 开发人员确认任务 POST /trade/task/develop */
export async function developerHandleTaskUsingPost(
  body: API.TradeTaskHandleVO,
  options?: { [key: string]: any },
) {
  return request<API.TradeResult>('/trade/task/develop', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 交易分派开发任务 POST /trade/task/insert */
export async function allotTradeTasksUsingPost(
  body: API.CqTradeTaskVO,
  options?: { [key: string]: any },
) {
  return request<API.TradeResult>('/trade/task/insert', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 交易任务列表 POST /trade/task/list */
export async function listAllTradeTaskUsingPost1(
  body: API.PageBeanTradeTaskListQuery_,
  options?: { [key: string]: any },
) {
  return request<API.TradeResult>('/trade/task/list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 交易预分配开发任务 POST /trade/task/prealloc */
export async function preAllocTradeTaskUsingPost(
  body: API.CqTradeTaskHandleVo,
  options?: { [key: string]: any },
) {
  return request<API.TradeResult>('/trade/task/prealloc', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 测试人员确认任务 POST /trade/task/test */
export async function testerHandleTaskUsingPost(
  body: API.TradeTaskHandleVO,
  options?: { [key: string]: any },
) {
  return request<API.TradeResult>('/trade/task/test', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
